﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DrugStorehouseMIS.Comm;
using DrugStorehouseMIS.DAL.Interface;

namespace DrugStorehouseMIS.DAL
{
    public class SystemManagerDAL:ISystemManagerDAL
    {

        #region ISystemManagerDAL 成员

        public int BackUp(string filepath, string filename)
        {
            try
            {
                SqlParameter[] all = new SqlParameter[]
                {
                    new SqlParameter("@FilePath",filepath),
                    new SqlParameter("@FileName",filename)
                };
                return SqlDbHelper.RunProcedureWithoutTran_Query(ConnectionString.ConnString, "Proc_SystemBackUp", all);
            }
            catch (Exception ex)
            {
                EventLog.WriteErrorLog(ex.Message);
                throw;
            }
        }

        #endregion
    }
}
